﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class SiteMaster : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack) {
            DepartmentModel model = new DepartmentModel();
            DataTable table = model.getDepartment();

            foreach (DataRow row in table.Rows) {
                String name = row["Name"].ToString();
                String value = row["DepartmentID"].ToString();
                String url = "~/NhanVien.aspx?dID=" + value;

                MenuItem item = new MenuItem(name, value, "", url);
                Menu2.Items.Add(item);
            }
        }
    }
    protected void NavigationMenu_MenuItemClick(object sender, MenuEventArgs e)
    {

    }
}
